extends Node2D



@onready var black = $black
@onready var bgm = $AudioStreamPlayer
@onready var label = $PressToStart

# Called when the node enters the scene tree for the first time.
func _ready() -> void:
	black.show()
	label.hide()
	GameUtiles.player_bag = {}
	GameUtiles.ingredients = []
	bgm.stop()
	GameUtiles.move_allow = false

	await get_tree().create_timer(2.0).timeout
	SeManager.play_shoot()
	await get_tree().create_timer(3.0).timeout
	black.hide()
	bgm.play()
	await get_tree().create_timer(2.0).timeout
	DialogueManager.show_dialogue_balloon(load("res://dialogues/dia_in_levels/end.dialogue"),"sky")

	
	
	

# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
	if GameUtiles.player_bag.get("home",0) >0 or GameUtiles.ingredients.has("home"):
		label.show()
